using WpfApp1.DataAccess;
using WpfApp1.Models;

namespace WpfApp1.Services;

public class TeacherCourseService : ITeacherCourseService
{
    private readonly ITeacherCourseDataAccess _teacherCourseDataAccess;

    public TeacherCourseService(ITeacherCourseDataAccess teacherCourseDataAccess)
    {
        _teacherCourseDataAccess = teacherCourseDataAccess;
    }
    
    //查询自己的课程信息(教师)
    public List<Course> GetTeacherCourseByNumber(string teacherNumber)
    {
        return _teacherCourseDataAccess.GetTeacherCourseByNumber(teacherNumber);
    }

    //给学生成绩分数
    public void AddStudentCourse(CourseSelection courseSelection)
    {
        _teacherCourseDataAccess.AddStudentCourse(courseSelection);
    }

    //修改学生成绩分数
    public void UpdateStudentCourse(CourseSelection courseSelection)
    {
        _teacherCourseDataAccess.UpdateStudentCourse(courseSelection);
    }

}